package cn.yuanqiao.archive.wenjianzhengli.mapper;/**
 * @author 赵常飞
 * @date 2023/6/20 20:16
 */

import cn.yuanqiao.archive.wenjianzhengli.domain.TenantTablehead;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 *
 *@AUTHOR:赵常飞
 *@date 2023/6/20 20:16
 */
public interface WenjianhuishouzhanMapper {

    List<Map<String,Object>> getdatalistnocate(@Param("fields") String fields, @Param("allTableName") String allTableName, @Param("states")int[] states, @Param("orderstr")String orderstr,@Param("search") String search,@Param("mjWhere")String mjWhere);

    String getSubTableName(@Param("categoryId")Long categoryId, @Param("sub") String sub, @Param("catetable") String catetable);

    List<Map<String, Object>> getdatalistbycateid(@Param("subtablename")String subtablename, @Param("fields") String fields, @Param("states") int[] states, @Param("orderstr")String orderstr, @Param("search") String search,@Param("mjWhere")String mjWhere);

    List<Map<String,String>> getcateidbysub(@Param("catetablename")String catetablename, @Param("subtablename") String subtablename);

    List<Map<String, Object>> getdatalistbyparentId(@Param("searchtablename")String searchtablename, @Param("relatable") String relatable, @Param("parentfield") String parentfield, @Param("sonfield") String sonfield, @Param("fields") String fields, @Param("parentId")Long parentId, @Param("orderstr")String orderstr, @Param("search") String search,@Param("mjWhere")String mjWhere);

    List<Map> getfieldlist(@Param("mdatalisttable")String mdatalisttable, @Param("fields")String fields, @Param("appendsql") String appendsql);

    void restore(@Param("allftable")String allftable, @Param("allfield") String allfield, @Param("subtablename") String subtablename, @Param("subfield") String subfield, @Param("ids") String ids);

    Map getparentmapbyson(@Param("parentTablename")String parentTablename, @Param("parenttableid") String parenttableid, @Param("retable") String retable, @Param("sonfield") String sonfield, @Param("parentfield") String parentfield, @Param("id") long id);

    void delete(@Param("allftable")String allftable, @Param("allfield")String allfield, @Param("subtablename") String subtablename, @Param("subfield") String subfield, @Param("ids") String ids);

    List getdeleteFile(@Param("doctable")String doctable, @Param("idsql") String idsql);

    void deleteefile(@Param("doctable") String doctable, @Param("idsql") String idsql);

    Map<String, String> getcateinfobyid(@Param("categoryId")Long categoryId, @Param("catetablename") String catetablename);

    void deleterela(@Param("relatable")String relatable, @Param("imidfield") String imidfield, @Param("id") String id);

    Long getcateidbydaid(@Param("catetableName")String catetableName, @Param("alltableName") String alltableName, @Param("tablefield")String tablefield, @Param("idfield")String idfield, @Param("daid") Long daid);

    Map<String, String> getparentmapbyson1(@Param("parentTablename")String parentTablename, @Param("parenttableid") String parenttableid, @Param("retable") String retable, @Param("sonfield") String sonfield, @Param("parentfield") String parentfield, @Param("id") long id);

    int deletehead(TenantTablehead tablehead);

    int addhead(TenantTablehead tablehead);

    int updatehead(TenantTablehead tablehead);

    String gethead(TenantTablehead tablehead);

    int createHeadTable(@Param("tableName")String tableName);

    List<Map<String, Object>> selectTableData(@Param("tableName") String tableName, @Param("field") String field, @Param("sql") String sql);
}
